package com.after.saas.client.service;

import com.after.saas.common.constants.Result;
import com.after.saas.common.constants.ServiceNameEnum;
import com.after.saas.client.service.factory.LogHystrixFactory;
import com.after.saas.common.model.dto.OperatorLogDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Classname LogClient
 * @Description TODO
 * @Date 2021/6/3 14:51
 * @Created by hjchen
 */

@FeignClient(contextId = "logService", value = ServiceNameEnum.SYS_SERVICE, fallbackFactory = LogHystrixFactory.class)
public interface LogClient {

    /**
     * 保存系统日志
     *
     * @param logDTO 日志实体
     * @return 结果
     */
    @PostMapping("/system/operator-log")
    Result saveLog(@RequestBody OperatorLogDTO logDTO);


}